type WidgetRegistryName =
  | "line-chart"
  | "bar-chart"
  | "indicator-kanban"
  | "table";

interface WidgetInfo {
  /** 组件唯一ID */
  id: string;
  /** 组件注册类型 */
  name: WidgetRegistryName;
  /** 组件数据 */
  data: any;
  /** 组件配置 */
  config: any;
}

type WidgetList = Array<WidgetInfo>;

interface Editor {
  /** 当前选中组件ID */
  curSelectedWidgetId: string | null;
  /** 全局设置 */
  golbalSettings: Record<string, any>;
  /** 组件列表 */
  widgetList: WidgetList;
}

export type { Editor, WidgetInfo, WidgetList, WidgetRegistryName };
